<template>
  <div class="CommonTitle">
    <div :class="['left', titleColor]">
      <div class="titleText">{{ titleText }}</div>
      <div class="des">{{ des }}</div>
    </div>
    <div class="right f-a-c">
      <slot name="rightSlot"></slot>
      <van-tag plain round :type="tagType" v-if="rightText">{{ rightText }}</van-tag>
    </div>
  </div>
</template>
<script setup lang="ts">
const props = defineProps({
  titleText: {
    type: String,
    default: '李四'
  },
  des: {
    type: String,
    default: ''
  },
  rightText: {
    type: String,
    default: ''
  },
  tagType: {
    type: String,
    default: 'primary'
  },
  titleColor: {
    type: String,
    default: 'themeColor'
  }
})
</script>

<style scoped lang="less">
.CommonTitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 30px;
  .left {
    display: flex;
    align-items: center;
    color: rgba(0, 0, 0, 0.9) !important;
    font-size: 17px;
    font-weight: bold;
    .titleText {
      margin-right: 15px;
    }
  }
  .themeColor {
    color: @themeColor;
  }
  .blueColor {
    color: @blueColor;
  }
  .blackColor {
    color: @blackColor;
  }
}
</style>
